package com.bandi.tharshesnows.model;

import java.util.List;

public class County extends PersistentModel {

  private String name;

  private boolean starred;

  private List<Resort> resorts;

  private Location location;

  private String resortsMap;

  public String getResortsMap() {
    return resortsMap;
  }

  public void setResortsMap(String resortsMap) {
    this.resortsMap = resortsMap;
  }

  public Location getLocation() {
    return location;
  }

  public void setLocation(Location location) {
    this.location = location;
  }

  public boolean isStarred() {
    return starred;
  }

  public void setStarred(boolean starred) {
    this.starred = starred;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public List<Resort> getResorts() {
    return resorts;
  }

  public void setResorts(List<Resort> localities) {
    this.resorts = localities;
  }

  @Override
  public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((name == null) ? 0 : name.hashCode());
    return result;
  }

  @Override
  public boolean equals(Object obj) {
    if (this == obj)
      return true;
    if (obj == null)
      return false;
    if (getClass() != obj.getClass())
      return false;
    County other = (County) obj;
    if (name == null) {
      if (other.name != null)
        return false;
    }
    else if (!name.equals(other.name))
      return false;
    return true;
  }

}
